﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BaseData.Exts
{
    public class DataSourceBase<T>
    {
        public DataSourceBase()
        {
            this.id = 0;
            this.parentId = 0;
            this.text = string.Empty;
            this.total = 0;
            this.left = false;
            this.right = false;
            this.side = false;
            this.selected = false;
            this.state = Enums.TreeStat.Open.ToString().ToLower();
            this.status = 0;
            this.msg = string.Empty;
            this.memo = string.Empty;
            this.flagLevel = 0;
            this.level = 0;
            this.flag = 0;
            this.children = new List<DataSourceBase<T>>();
            this.rows = new List<DataSourceBase<T>>();
        }
        public int id { get; set; }
        public int parentId { get; set; }
        public string text { get; set; }
        public int total { get; set; }
        public bool left { get; set; }
        public string leftText { get; set; }
        public bool right { get; set; }
        public string rightText { get; set; }
        public bool side { get; set; }
        public string sideText { get; set; }
        public bool selected { get; set; }
        public string state { get; set; }
        public int status { get; set; }
        public string memo { get; set; }
        public string msg { get; set; }
        public int flag { get; set; }
        public int? level { get; set; }
        public int? flagLevel { get; set; }
        public IEnumerable<DataSourceBase<T>> children { get; set; }
        public IEnumerable<DataSourceBase<T>> rows { get; set; }
    }
}
